Open hosseinzoda opened 7 years ago
This also helps with handling concurrent add requests.
To clarify. I mean we should manage when to actually do add project. https://github.com/openassistive/OpenATBackend/blob/master/js/savejson/savejson.controller.js#L43
So first thing comes to mind is to create a queue of add projects until deploy window finishes. And then push to git
Anyway this is not an issue for now.
There are problems creating our own CI system:
So the real issue is:
And on a side-note:
Hmm. How about:
AND
we tag all entries as "to-be-moderated" if an item has "to-be-moderated" tag then we colour it or label it different on the frontend
Correct, This helps a lot on filtering contents. Also we can associate an ip address of issuer to it. So we can easily remove spams.
There are problems creating our own CI system:
I did not suggest to create another CI. My suggestion was close your instructions. By limiting amount of deploy request this will get fixed. (Also con-current requests will get fixed) Here's the instruction for my suggestion
Now next time to process a deploy may vary depending on few parameters and state of deployment.
Ah ok. Makes sense. I think we are agreeing then!
One small problem though with a queue.. What if someone goes and adds something directly to GitHub inbetween. Wouldn't this create a conflict
(Maybe so unlikely we ignore this edgecase)
Instead - commit everything to GitHub as we do. And only deploy once an hour. To reduce over hitting gitHub however keep the local queue to 1 minute.
(Just leaving this here: https://devcenter.heroku.com/articles/scheduler#installing-the-add-on. Basically we just need a service e.g. /deploy that is accessible via the web. Would be useful to restrict this to an IP)
/save does know what to do on conflict. It will replace it.
(Just leaving this here: https://devcenter.heroku.com/articles/scheduler#installing-the-add-on. Basically we just need a service e.g. /deploy that is accessible via the web. Would be useful to restrict this to an IP)
Correct.
/save does know what to do on conflict. It will replace it.
Yep. Whats your thoughts on:
Instead - commit everything to GitHub as we do. And only deploy once an hour. To reduce over hitting gitHub however keep the local queue to 1 minute.
?
Instead - commit everything to GitHub as we do. And only deploy once an hour. To reduce over hitting gitHub however keep the local queue to 1 minute.
I think It's dependent to build time (time it takes to complete a deploy process). Like if It's 10 seconds then margin between deploy triggers can be one minute.
Github does not have much to do on changes occur, I think It's inexpensive task.
Anyway one or few build(s) every minute will not exceed rate limit.
We can write some code to figure this out. depending on previous build time.
Its quick right now. My guess under 2 minutes. but yeah - we can work out exact timing as we go
Why It's needed?
My suggestion
By setting up deploy window we can fix this issue.
What's good about it
Core: Depending on few variables and the state of deployment determine next
deploy or git push trigger