No reason to exclude JSON and what bs4 *thinks* is invalid HTML
The browser is happy to render both of those if its remotely valid
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Passing a method results in rq doing some internal gymnastics to
generate this string. In our case, this function never changes so we can
get rid of those steps
- Scheduler tick is 1 minute
- Fastest jobs are at least 4 minutes apart.
3/4 times we are wasting cpu cycle for each site.
Fix:
- Check every 4 minutes.
- Align the sleep around real clock to fix problem of jobs executing
randomly in any part of the minute.
Cons:
Anything not aligned with scheduler interval will be delayed.
* build: Bump RQ
Latest version simplifies workerpool extension a bit
* fix: Disable RQ's scheduler
It's now enabled by default with no easy way to disable it except
upstream change or overriding the run_worker method. So better to
disable it with custom worker class.
- Single worker adds some extra costs to each worker (importing scheduler)
- Workerpool can import it all once and share
- This way we need not have many different
- Scheduled Job sync when type was changed from scheduled to some other
type didn't work.
- It updates on every save with message, bad DX IMO (can't save script
and edit without dismissing)
- This was because of complex walrus which was triggering rest of code
even when nothing changed. Maybe walrus opponents were onto something.
- `Truthy` couples two different operations and hence makes code
complicated. In most cases where these checks are required it's not
performance critical, we can do 1 more function call to avoid this
coupling of change + actual value.
num2words - 260KB - Used frequently on ERPNext sites.
babel - 1.1MB Gets imported because of dates, localization
sentry - 2.8MB should be loaded only if envvar is set
gettext - required for reading translations
This seems to occur when new files are being created as we're archiving
the files on a site. Doesn't make sense to fail the entire backup
because of that.
Signed-off-by: Akhil Narang <me@akhilnarang.dev>