SyncfirebaseCloudFirestore Sync sources and publish updated category


Synchronize XML from different sources, to filter out duplicates and print static customer vacancies in files system. That is internal working method, we are not currently publishing scripts in open source projects because the project is still too raw. 

On server vacatures.today



./crontab/syncjobs.bash


It contains


python3 manage.py syncfirebaseCloudFirestore

python3 manage.py deleteold

yes | python3 manage.py rebuild_index --using=default



On client for firebase deploy

./publish_categories.bash

If not installed.


sudo pip3 install firebase-admin
sudo pip3 install -U Jinja2




Old version slugify is not working in py3.


sudo pip3 uninstall slugify

sudo pip3 install python-slugify




eslint: command not found


/bin/sh: eslint: command not found

npm ERR! code ELIFECYCLE

npm ERR! syscall spawn

npm ERR! file /Users/sergejdergatsjev/.cache/firebase/runtime/shell

npm ERR! errno ENOENT

npm ERR! functions@ lint: `eslint .`

npm ERR! spawn ENOENT

npm ERR!

npm ERR! Failed at the functions@ lint script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.


npm ERR! A complete log of this run can be found in:

npm ERR! /Users/sergejdergatsjev/.npm/_logs/2021-08-18T18_24_01_872Z-debug.log



https://nodejs.org/en/download/



sudo npm install npm -g
Sudo npm install -g eslint
firebase deploy




Error: package.json in functions directory has an engines field which is unsupported. Valid choices are: {"node": "10"}, {"node":"12"}, and {"node":"14"}.


Deploys to runtimes below Node.js 10 are now disabled in the Firebase CLI. Existing Node.js 8 functions will stop executing on 2021-03-15. Update existing functions to Node.js 10 or greater as soon as possible.

vim functions/package.json


"engines": {

"node": "12"

},




Comments