Skip to content
This repository has been archived by the owner on Nov 5, 2020. It is now read-only.

Commit

Permalink
Adds save for each iteration (patch)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrrrzzt committed Aug 20, 2019
1 parent a326a4b commit f7ce5cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions utils/send-sms-messages.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(async () => {
require('dotenv').config()
const { writeFile } = require('fs').promises
const logger = require('../lib/logger')
const getMobilePhoneNumber = require('../lib/get-mobile-number')
const sendSmsMessage = require('../lib/send-sms')
Expand Down Expand Up @@ -29,6 +30,7 @@
failCount++
logger('info', ['utils', 'send-sms-message', 'avtale', avtale.aid, 'mobile number not available'])
}
await writeFile('data/avtaler-query.json', JSON.stringify(avtaler, null, 2), 'utf-8')
logger('info', ['utils', 'send-sms-message', `${avtaler.length} avtaler to go`])
}
logger('info', ['utils', 'send-sms-message', 'finished', 'success', successCount, 'fails', failCount])
Expand Down

0 comments on commit f7ce5cd

Please sign in to comment.