rDrama/gunicorn.conf.py

31 lines
632 B
Python
Raw Normal View History

2022-08-24 01:40:17 +00:00
bind = '0.0.0.0:5000'
workers = 9
worker_class = 'gevent'
max_requests = 30000
max_requests_jitter = 30000
reload = True
update spooky to latest version of frost (#376) * sneed * fix last commit * fix /live ordering * Add "Upvoted" post/comment lists on profile. * PCM /live: fix hover border resizing table rows. * Make forced banned hat respect unban_utc. * Revert "PCM /live: fix hover border resizing table rows." This reverts commit baf93e48543826ebf48eceacee82ffa5a01a500c. Apparently the resizing was desired behavior. * sneed * Fix Thin badge popover sizing; expand assetcache. * sneed * sneed * change wording * allow some ppl to have spider permenantly * show if user is shadowbanned for admins (#368) there's really no other indication in the UI except the unshadowban button * Accept any TLDS (#369) * add "are you sure?" to /live * fix * fix * fix /live * fix /live * strip input [/live] * fix width * same as last commit * country club leak fix (#370) * save ragnar on WPD * sneed * [DO NOT MERGE] Chat restructure (#360) * Create new subdirectory for chat-related stuff * Gitignore * Have new code show up on chat * Have new code show up on chat * Fix config issue * More script stuff * Create UserInput components * More chat changes * More updates to chat * Add chat:watch script * Move up state and pass down * Match up existing functionality entirely * Match up existing functionality entirely * Send a message when hitting Enter * feature based directories * First crack at emoji drawer * Leave everything in a fucked up state ugh * Leave it in a better state * Stop for the night * Decouple by abstract chat functionality to provider * Wait a minute... * Small chat restructure * Prepare for notifications * Add root context * Flash number of messages * Read this and u die * Add quote functionality * Couple tweaks * Shallowenize the features dir/ * Add activity list * Ch-ch-ch-ch-ch-changes * Enable moving drawer * Hover style on activities * UserList changes * Add emoji processing logic * Duhhhh * Scroll to top when changing query * Put the emoji in the drawer * Improve emoji drawer * Add emoji genres * Do not show activities * Add feature flag technology * Fix issue where own messages were triggering notifications * Adjust startup scripts * Responsive part 1 * Styling changes for emoji genres * More emoji drawer styling * Add QuickEmojis * Re-add classnames * Set version * Modify build script * Modify build script * Mild renaming * Lots of styling changes * Leggo. * Minify on production * Minor chat styling issue * Tick version * Chat rework deployment infra fixes. * sneed * Minor styling changes * Fix issue for iphone * Remove yarn build artefacts from index. * Scroll to the bottom a single time * Always scroll to the bottom for now * sneed * sneed * Implement hash-based cachebusting module. Adds the files.helpers.assetcache module, which runs on worker startup to compute CRC digests of files in given asset directories and provides a Jinja filter to create cachebusted URLs based on those hashes. This alleviates the need to increment cachebusting counters in query strings entirely for files it is applied to. * assetcache: apply to all CSS and JS assets. * assetcache: change asset_siteimg macro to filter. * sneed * sneed * sneed * sneed * sneed * Order sub exile/etc listings reverse chronological. * Add exile time to sub exiles listing. * remove bad banner * sneed * Fix sidebar * Don't scroll down unless you need to * Confirm before deleting * More cosmetic changes * Add human readable timestamp * Tick version * Tick version * Chat height fix * sneed * sneed * Add typing debounce/enable quoting * fix the TLD matching to exclude numbers (#371) * Fix that * Update timestamps all at once * don't leak usernames with deflectors (#372) cope marsey xd * Fix syntax error in 8b722f2075d5. * Replace QuotedMessage with QuotedMessageLink * Tick version * mobile viewport fix * Change size of App content * Don't autofocus on user ipnut * Remove padding from chat messages * Back to 60vh * improve JC's previous cc PR * add spider toggle * same as last commit * fix last commit * Chat styling * Adjust chat height * Small padding on mobile chat heading * Move emoji and send button outside of textarea * make addition and removal of channels happen instantly (testing in devrama) * fix prev commit * fix * Fix button borders in dark theme * Try 62vh? * flush printed shit * Allow heading to close drawer * redirect instead of rendering * proxy all requests we make * Scroll to bottom of chat when any drawer closes * get it ready for pcm * testing on devrama * testin on devrama * fix * Censor quoted text * testing * Reduce content size on mobile when quoting * testing on pcm * same as last commit * fix * fix * the fuck * fix * fix * fix * fix * fix grammar (i think) * fix /live regex * sneed * fix * debug * limit adding channels to kip * allow me to add channels * fix * add obese * added "watching" in /live * make it possible to add channels by name * same as last commit * same as last commit * fix * fix * huh? * add consent * allow pcm /live to enter channel link * sneed * make it look better * fixing /live * fix exploit * make holes cost 50k again * sneed * Unnecessary check * sneed * Change how chat actions look * Don't allow multiple sets of actions open * Don't fade in messages * delete the spider badge if unspidering, not the marsify one (#374) * Padding to quoted link * sneed * More compact datetime format in table timestamps. * sneed * Show images * Calculate correct position of bottom input * Tweak height * Change height for mobile vs desktop * Fix body min-height to new vh * Bring back mentions * Show highlight when replied to as well * Make it bigger * reduce resize values * limit sidebar and badge images to 1MB * Remove voluntary marsify toggle. * limit banners to 1MB * convert an emoji to webp * convert 4 images to webp * convert 2 images to webp * convert 1 image to webp * remove proxies from cloudflare * add proxies on discord requests * add proxies on lain.la requests * add proxies on pushshift requests * add proxies on discord requests * add proxies on hcaptcha requests * log /live errors * make it possible to click on the spider * stop misleading ppl in 502.htmo * make description better * reduce margin * 500 -> 502 * Reload gunicorn on CSS/JS changes. assetcache hashes files on worker startup. We don't really mind a worker reload on asset changes, since that's no worse than the old setup with incrementing numbers. But to make this work smoothly, we listen for changes to the CSS/JS dirs and reload on change. * sneed * make using proxies only happen in 3 circumstances again * fix tall emojis in emoji modal * test yarn * fix prev commit * go from dutch to greek in /live * Revert "Revert "WPD: enable rotating sidebar art & admin thread."" This reverts commit 74db58e54b67a3af98ef1882ec0691ce48e0c4fb. * WPD: restrict rotating sidebars to logged-in. * WPD: add more sidebars. * sneed * Revise marsify logic. * sneed * disallow permabanned hole mods from pinning or unpinning * sneed * add furry and pony image hosts * sneed * sneed * sneed * sneed * check for existing subscription * fix syntax error in last commit * remove unnecessary imports * make badges 300px instead * Scroll chat input into view when focused * Tweak * Tweak * Tweak * check for duplicate images when admigger threads for banners/sidebar/badges are used * Re-add expanded image and emojimodal * sneed * Fix /marseys missing listdir import. Apparently the /marseys route was getting its listdir from one of the `from os import listdir` removed in fa4dee419db6. static.py already has an import os, so we just use the fully qualified os.listdir. * sneed * Add to draft when selecting an emoji * Remove console.log * Restore mistakenly removed commenting logic. * Add DMing to chat * Nest if condition in chat * Try again to fix DM issue * Rebuild assetcache on inotify events. * Fix leaderboard_thread dispatched as blocking. * testing smth * sneed * sneed * remove testing print statement * testing worker reloading * test stagger again * sneed Co-authored-by: Aevann1 <randomname42029@gmail.com> Co-authored-by: TLSM <duolsm@outlook.com> Co-authored-by: justcool393 <justcool393@gmail.com> Co-authored-by: official-techsupport <98240022+official-techsupport@users.noreply.github.com> Co-authored-by: outruncolors <78451621+outruncolors@users.noreply.github.com> Co-authored-by: Outrun Colors <itsoutruncolors@gmail.com>
2022-09-27 19:17:36 +00:00
reload_engine = 'poll'
2022-08-24 01:40:17 +00:00
#print_config = True
def worker_abort(worker):
worker.log.warning(f"Worker {worker.pid} received SIGABRT.")
try:
import flask
r = flask.request
worker.log.warning(f"While serving {r.method} {r.url}")
from files.helpers.wrappers import get_logged_in_user
u = get_logged_in_user()
if u:
worker.log.warning(f"User: {u.username!r} id:{u.id}")
else:
worker.log.warning(f"User: not logged in")
except:
worker.log.warning("No request info")
2022-08-24 01:40:17 +00:00
import os
os.abort()