Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
470 commits
Select commit Hold shift + click to select a range
c509fda
[add]touch spawnpoints every 6 hours
MonkeyTedBaker Sep 20, 2017
71f6681
[fix]cleanup bug fix when running with --no-status-bar flag
MonkeyTedBaker Sep 20, 2017
b479cb3
[fix]cleanup bug fix when running with --no-status-bar flag
MonkeyTedBaker Sep 20, 2017
7dce87d
Merge branch 'monkey' into develop
MonkeyTedBaker Sep 21, 2017
f2a385e
Merge branch 'develop' of github.com:ZeChrales/Monocle into temp
MonkeyTedBaker Sep 21, 2017
e18242a
Merge branch 'monkey' into develop
MonkeyTedBaker Sep 21, 2017
097a2ec
[fix]supervisor stopwaitseconds to 90
MonkeyTedBaker Sep 21, 2017
e283c58
[add]Hashing Timeout stats
MonkeyTedBaker Sep 21, 2017
e75e4c7
[fix]cleanup_spawnpoints.sql
MonkeyTedBaker Sep 21, 2017
26e4efe
[add]monotailer restart.sh
MonkeyTedBaker Sep 21, 2017
5ac1b05
[fix]skip encounter and notification for pokemons in insert blacklist…
MonkeyTedBaker Sep 21, 2017
90c9011
Merge pull request #25 from Avatar690/NoTrash
MonkeyTedBaker Sep 21, 2017
b1eb826
Merge branch 'develop' into touch_sp
MonkeyTedBaker Sep 21, 2017
62cb2ad
Merge pull request #28 from MonkeyTedBaker/touch_sp
MonkeyTedBaker Sep 21, 2017
3ec11b2
Merge branch 'monkey' into develop
MonkeyTedBaker Sep 21, 2017
b3a6920
[fix]monotailer processes.json
MonkeyTedBaker Sep 22, 2017
c5271f4
[fix]despawn_time null bug
MonkeyTedBaker Sep 23, 2017
3eb5b21
Merge branch 'monkey' into develop
MonkeyTedBaker Sep 23, 2017
a4fa18b
Merge pull request #29 from MonkeyTedBaker/develop
cptmedic Sep 23, 2017
c054a73
adding logged_files to sanitizer
cptmedic Sep 23, 2017
f0fc601
Changing to allow config file logging to more files
cptmedic Sep 23, 2017
aea0966
Adding LOGGED_FILES
cptmedic Sep 23, 2017
60f69a0
Merge pull request #29 from captainmedic/monkey
MonkeyTedBaker Sep 23, 2017
3f8616a
[add]alembic for migration management
MonkeyTedBaker Sep 24, 2017
18ea39c
[add]history keeping
MonkeyTedBaker Sep 24, 2017
fa1e025
Merge branch 'migrate' into develop
MonkeyTedBaker Sep 25, 2017
05bcfb5
Merge pull request #30 from MonkeyTedBaker/migrate
MonkeyTedBaker Sep 25, 2017
a82aa4f
[fix]monotailer
MonkeyTedBaker Sep 25, 2017
2b549c2
0.75.0
ZeChrales Sep 25, 2017
67ea799
Merge branch 'develop' of github.com:ZeChrales/Monocle into monkey
MonkeyTedBaker Sep 25, 2017
8a1eb5f
Merge branch 'develop' of https://github.com/MonkeyTedBaker/Monocle i…
MonkeyTedBaker Sep 25, 2017
b63532f
Merge branch 'monkey' into develop
MonkeyTedBaker Sep 25, 2017
bb59827
[fix]monotailer
MonkeyTedBaker Sep 26, 2017
0c46bf1
[add]allow instances to run under capacity (even if there are not enough
MonkeyTedBaker Sep 26, 2017
10440ec
Merge branch 'monkey' into develop
MonkeyTedBaker Sep 26, 2017
ebb8279
[fix]cleanup.sql
MonkeyTedBaker Sep 27, 2017
8218233
[add]python3.6 support
MonkeyTedBaker Sep 27, 2017
a9413bd
[add]engine isolation level to READ_UNCOMMITTED to reduce I of ACID
MonkeyTedBaker Sep 27, 2017
3357b1c
[fix]touch_spawns in an attempt to avoid deadlocks
MonkeyTedBaker Sep 27, 2017
1a0d276
[add]print db queue to log ever 10 secs
MonkeyTedBaker Sep 27, 2017
8d889d3
[add]general unique key bug fixes and performance improvement
MonkeyTedBaker Sep 27, 2017
a05835c
[fix]5s batch comment to 1s.
MonkeyTedBaker Sep 27, 2017
660128b
Merge branch 'boost' into temp
MonkeyTedBaker Sep 27, 2017
ee7bd82
[fix]shorten IntegrityError message
MonkeyTedBaker Sep 27, 2017
214ff3d
Merge branch 'boost' into temp
MonkeyTedBaker Sep 27, 2017
8ce7f7c
Merge pull request #31 from MonkeyTedBaker/boost
MonkeyTedBaker Sep 29, 2017
6d3c2ac
[add]faster sighting cache preloading
MonkeyTedBaker Sep 29, 2017
aed22c1
erge branch 'monkey' into develop
MonkeyTedBaker Sep 29, 2017
4a7e3b9
Merge pull request #30 from MonkeyTedBaker/develop
cptmedic Sep 29, 2017
f2a0bd7
Create print_alt.py
cptmedic Sep 29, 2017
bd311de
Merge pull request #32 from captainmedic/printalt
MonkeyTedBaker Sep 29, 2017
0256512
Merge pull request #31 from MonkeyTedBaker/develop
cptmedic Sep 29, 2017
9bbb448
[add]last_updated columns
MonkeyTedBaker Sep 29, 2017
dd6564a
Merge branch 'develop' of https://github.com/MonkeyTedBaker/Monocle i…
MonkeyTedBaker Sep 29, 2017
7fd3279
Merge branch 'monkey' into develop
MonkeyTedBaker Sep 29, 2017
7d86f8d
Merge pull request #33 from MonkeyTedBaker/last_updated
MonkeyTedBaker Sep 30, 2017
47c8323
Merge pull request #32 from MonkeyTedBaker/develop
cptmedic Sep 30, 2017
f305c41
[rmv]Removed config SPAWN_ID_INT (string is deprecated. Will be
MonkeyTedBaker Oct 2, 2017
ef3f095
[add]altitudes rounding for individual point request
MonkeyTedBaker Oct 2, 2017
f70bb00
[fix]sightings unique key integrity error
MonkeyTedBaker Oct 2, 2017
d9d041a
Merge branch 'monkey' into test
MonkeyTedBaker Oct 2, 2017
1dcac2e
[add]stopsignal=INT
MonkeyTedBaker Oct 2, 2017
258150f
[fix]base table migration bug fix
MonkeyTedBaker Oct 2, 2017
5e7d8e7
[add]changed last_updated(TIMESTAMP) to updated(INT)
MonkeyTedBaker Oct 3, 2017
c9a7156
[rmv]Removed config SPAWN_ID_INT (string is deprecated. Will be
MonkeyTedBaker Oct 2, 2017
ee693c9
[add]altitudes rounding for individual point request
MonkeyTedBaker Oct 2, 2017
b8742f6
[fix]sightings unique key integrity error
MonkeyTedBaker Oct 2, 2017
cc60b35
[fix]log stats
MonkeyTedBaker Oct 3, 2017
6ac3077
[fix]encounter logic fix during bootstrap
MonkeyTedBaker Oct 3, 2017
453b82d
[add]bootstrap bug fix for adding unknown
MonkeyTedBaker Oct 4, 2017
38a9ee7
[fix]apply --no-pickle to FortCache too
MonkeyTedBaker Oct 4, 2017
d82cf34
Merge pull request #37 from MonkeyTedBaker/sightings_unique_key
MonkeyTedBaker Oct 4, 2017
4311868
Merge remote-tracking branch 'monkey/develop' into develop
MonkeyTedBaker Oct 4, 2017
d4e7e03
Merge branch 'develop' of https://github.com/MonkeyTedBaker/Monocle i…
MonkeyTedBaker Oct 4, 2017
c414ebd
[fix]spawns.despawn_time is null during loading
MonkeyTedBaker Oct 4, 2017
d16413c
[fix]despawn_time = null case during loading
MonkeyTedBaker Oct 4, 2017
64f55f3
Merge branch 'sightings_unique_key' into develop
MonkeyTedBaker Oct 4, 2017
71c1edf
[fix]spawns.update()
MonkeyTedBaker Oct 4, 2017
494e483
Merge remote-tracking branch 'monkey/develop' into develop
MonkeyTedBaker Oct 4, 2017
4874459
[add]cleanup.py
MonkeyTedBaker Oct 4, 2017
5cf0506
Merge branch 'cleanup' into develop
MonkeyTedBaker Oct 5, 2017
561575f
[add]cleanup.py
MonkeyTedBaker Oct 4, 2017
95898f4
[add]changed whenever schedule
MonkeyTedBaker Oct 5, 2017
116fb2b
Adapting Scan Log Webhook
cptmedic Oct 5, 2017
3fd3ff0
Adapting Scan Log Webhook
cptmedic Oct 5, 2017
d9c5f3c
Adapt to send Notifications
cptmedic Oct 5, 2017
dd6d631
Adapt scan log webhook
cptmedic Oct 5, 2017
0968ab5
Import OS
cptmedic Oct 5, 2017
07b32fd
[add]support for multiple instaces for cleanup
MonkeyTedBaker Oct 5, 2017
28d50cb
[fix]cleanup Merge branch 'cleanup' into develop
MonkeyTedBaker Oct 5, 2017
4cedcab
Merge branch 'cleanup' into temp
MonkeyTedBaker Oct 5, 2017
90e1a76
Merge pull request #39 from MonkeyTedBaker/cleanup
MonkeyTedBaker Oct 5, 2017
9da126b
Merge branch 'develop' into bootstrapnotify
cptmedic Oct 5, 2017
5d1d161
[fix]multiple instance set cron support
MonkeyTedBaker Oct 5, 2017
af0f6b0
Merge branch 'develop' of https://github.com/MonkeyTedBaker/Monocle i…
MonkeyTedBaker Oct 5, 2017
d7072d8
0.75.1
ZeChrales Oct 5, 2017
3f9d4db
Merge branch 'develop' of github.com:ZeChrales/Monocle into monkey
MonkeyTedBaker Oct 5, 2017
c632c44
Merge branch 'monkey' into develop
MonkeyTedBaker Oct 5, 2017
6ebeba9
[add]print_forts.py
MonkeyTedBaker Oct 5, 2017
84e80e3
[add]accounts.py
MonkeyTedBaker Oct 5, 2017
49d391e
Update db.py
kikootwo Oct 6, 2017
2996a5b
Update web_utils.py
kikootwo Oct 6, 2017
3c93b0c
Update main.js
kikootwo Oct 6, 2017
092224a
[add]Account import script
MonkeyTedBaker Oct 6, 2017
c4a6e94
[fix]raid_webhook performance fix
MonkeyTedBaker Oct 6, 2017
46ded05
[add]sb-detector semaphore with 4 concurrency
MonkeyTedBaker Oct 6, 2017
901700b
[add]update banned accounts
MonkeyTedBaker Oct 6, 2017
799413c
[fix]auth token bug
MonkeyTedBaker Oct 6, 2017
0465852
[add]touch fort_sightings on raids change
MonkeyTedBaker Oct 7, 2017
f20d2a5
[fix]del captcha field on fresh import from pickles.
phonezawphyo Oct 7, 2017
9f0c256
[fix]Account bug in worker
phonezawphyo Oct 7, 2017
ee36aae
[fix]generate_device_info
phonezawphyo Oct 7, 2017
8c54fc6
[add]kinan
phonezawphyo Oct 7, 2017
447cf38
[add]kinan OK
MonkeyTedBaker Oct 8, 2017
db84d24
[fix]spawn point cleaning schedule
MonkeyTedBaker Oct 8, 2017
b8e2593
Update config.example.py
MonkeyTedBaker Oct 8, 2017
5f9bc46
Merge pull request #41 from captainmedic/bootstrapnotify
MonkeyTedBaker Oct 8, 2017
9cd1ca5
Update main.js
MonkeyTedBaker Oct 8, 2017
2649df9
Update db.py
MonkeyTedBaker Oct 8, 2017
72401a4
Merge pull request #43 from kikootwo/develop
MonkeyTedBaker Oct 8, 2017
f8db674
Merge pull request #46 from MonkeyTedBaker/raid_touch
MonkeyTedBaker Oct 8, 2017
bd24e66
OdibalAvatar Oct 8, 2017
23f22a3
[fix]accounts import
MonkeyTedBaker Oct 8, 2017
89b7bba
[fix]ban reason
MonkeyTedBaker Oct 8, 2017
88f898e
[fix]load account tuple bug
MonkeyTedBaker Oct 8, 2017
0f95e36
Merge pull request #47 from Avatar690/ImprovePokestop
MonkeyTedBaker Oct 8, 2017
6e169cc
[add]import traceback to overseer
MonkeyTedBaker Oct 9, 2017
e8bdf35
[add]commit every 1000 accounts on import
MonkeyTedBaker Oct 9, 2017
1e01a55
[fix]skip duplicate imports
MonkeyTedBaker Oct 9, 2017
d42f8db
[add]ACCOUNTS_SWAP_OUT_ON_WARN flag
MonkeyTedBaker Oct 9, 2017
8253c2e
[add]more deprecation messages to scripts/create_db.py and brought ba…
MonkeyTedBaker Oct 9, 2017
b783a5d
[add]swapin cron
MonkeyTedBaker Oct 9, 2017
4c39f60
[add]handle wrong credentials swap
MonkeyTedBaker Oct 9, 2017
93f259a
Merge pull request #45 from MonkeyTedBaker/reserves
MonkeyTedBaker Oct 9, 2017
94de239
[rmv]monocle-icons
MonkeyTedBaker Oct 10, 2017
6d6aaa1
[add]MonkeyTedBaker/monocle-icons
MonkeyTedBaker Oct 10, 2017
d377ba8
[rmv]gotten rid of forts.unpickle
MonkeyTedBaker Oct 10, 2017
f1495b9
Merge pull request #49 from MonkeyTedBaker/unpickle
MonkeyTedBaker Oct 10, 2017
8663332
[rmv]existance checkk in alembic base tables creation
MonkeyTedBaker Oct 10, 2017
6782d8d
[add]remove column to accounts
MonkeyTedBaker Oct 10, 2017
03baed5
[add]account removal
MonkeyTedBaker Oct 10, 2017
adcb5e2
[add]remove account from slave pool once it reaches level 30
MonkeyTedBaker Oct 10, 2017
0861465
Merge branch 'monkey' into temp
MonkeyTedBaker Oct 10, 2017
39ad767
[add]unverified email handling
MonkeyTedBaker Oct 10, 2017
fb8498a
Merge pull request #34 from MonkeyTedBaker/develop
cptmedic Oct 10, 2017
edb5d12
[fix]swapin time bug
MonkeyTedBaker Oct 11, 2017
7e2a308
Merge branch 'fix' into temp
MonkeyTedBaker Oct 11, 2017
ff8b095
Merge branch 'temp' into develop
MonkeyTedBaker Oct 11, 2017
c9593a2
[add]swapin cron
MonkeyTedBaker Oct 11, 2017
432f394
[add]concurrency envvar
MonkeyTedBaker Oct 11, 2017
b88e341
Merge pull request #50 from MonkeyTedBaker/remove_account
MonkeyTedBaker Oct 11, 2017
f7f7141
[fix]some config default values
MonkeyTedBaker Oct 11, 2017
36235b5
Consistency in Removal
cptmedic Oct 11, 2017
df9fde9
Update worker.py
cptmedic Oct 11, 2017
ed0468a
Update worker.py
cptmedic Oct 11, 2017
a354531
Merge pull request #52 from captainmedic/consist
MonkeyTedBaker Oct 11, 2017
988a6c4
[add]index to reason
MonkeyTedBaker Oct 11, 2017
bd2e48a
Merge branch 'monkey' into develop
MonkeyTedBaker Oct 11, 2017
d66a6bb
[fix]stop wait to 180
MonkeyTedBaker Oct 11, 2017
53d2757
[fix]help
MonkeyTedBaker Oct 11, 2017
faf5380
[fix]help
MonkeyTedBaker Oct 11, 2017
01bf6bb
Merge pull request #53 from MonkeyTedBaker/account_stats
MonkeyTedBaker Oct 11, 2017
0176e4a
Update overseer.py
MonkeyTedBaker Oct 11, 2017
0c302da
[add]account get log
MonkeyTedBaker Oct 12, 2017
74f38b5
[add]common table
MonkeyTedBaker Oct 12, 2017
339be7c
Merge branch 'monkey' into develop
MonkeyTedBaker Oct 12, 2017
6a4f300
[add]migration file
MonkeyTedBaker Oct 12, 2017
48d09f5
Merge branch 'monkey' into develop
MonkeyTedBaker Oct 12, 2017
37b6386
[rmv]remove account get concurrency
MonkeyTedBaker Oct 12, 2017
2c3c1a5
Merge branch 'semaphore' into develop
MonkeyTedBaker Oct 12, 2017
2e8d371
[add]sync semaphore
MonkeyTedBaker Oct 12, 2017
93a3feb
Merge pull request #54 from MonkeyTedBaker/semaphore
MonkeyTedBaker Oct 12, 2017
6d7d2e5
[add]code3 swap-out/hibernation
MonkeyTedBaker Oct 12, 2017
e7ebc92
Update worker.py
MonkeyTedBaker Oct 12, 2017
d09f044
Update accounts.py
MonkeyTedBaker Oct 12, 2017
fc2344b
Merge pull request #55 from MonkeyTedBaker/code3
MonkeyTedBaker Oct 12, 2017
b278b81
Update config.example.py
MonkeyTedBaker Oct 12, 2017
eda191a
[add]default=False to accounts.remove migration
MonkeyTedBaker Oct 12, 2017
05e31ff
[fix]default failures allowed to 20
MonkeyTedBaker Oct 13, 2017
085ac8b
0.77.1
ZeChrales Oct 13, 2017
cf53348
Temp Change to my aiopogo
cptmedic Oct 13, 2017
f9c6f11
Merge pull request #57 from ZeChrales/develop
cptmedic Oct 13, 2017
6825dd6
[fix]changed back aiopogo
MonkeyTedBaker Oct 13, 2017
ea31e6c
[add]configurable hash endpoints
MonkeyTedBaker Oct 14, 2017
0081eda
[add]D revive
MonkeyTedBaker Oct 14, 2017
96a5f2e
[fix]common update time
MonkeyTedBaker Oct 14, 2017
78ca67f
Merge pull request #58 from MonkeyTedBaker/swap
MonkeyTedBaker Oct 14, 2017
81af05e
[add]overseer DB access error handling
MonkeyTedBaker Oct 15, 2017
15e05cd
[add]EXTRA_ACCOUNT_PERCENT to swap oldest condition
MonkeyTedBaker Oct 15, 2017
1abc07a
[add]attempt to improve sb.py stability
MonkeyTedBaker Oct 15, 2017
780bac8
[fix]SB_ default config
MonkeyTedBaker Oct 16, 2017
0ada25a
Merge pull request #59 from MonkeyTedBaker/sb
MonkeyTedBaker Oct 16, 2017
c2a5fc2
update PT names
ZeChrales Oct 17, 2017
d8e1943
update names for EN ZH JA
Oct 17, 2017
2c98b37
space
Oct 17, 2017
cd0d13f
update PT names
ZeChrales Oct 17, 2017
4cd87e8
0.79.3
ZeChrales Oct 18, 2017
d6c9de5
Merge branch 'develop' of https://github.com/ZeChrales/Monocle into d…
ZeChrales Oct 18, 2017
0c7dd1e
Merge pull request #64 from ZeChrales/develop
MonkeyTedBaker Oct 18, 2017
4789966
Merge pull request #65 from yichungwang/develop
MonkeyTedBaker Oct 18, 2017
51de516
Monkey Hyperdrive (#62)
MonkeyTedBaker Oct 19, 2017
49fe06c
[fix]worker_dict bug
MonkeyTedBaker Oct 19, 2017
10d8bf3
[fix]sb_detector None bug
MonkeyTedBaker Oct 19, 2017
809ffba
[add]hardcore hyperdrive unchained
MonkeyTedBaker Oct 19, 2017
2d01ed3
[fix]removed 'notifying' from ENCOUNTER
MonkeyTedBaker Oct 19, 2017
6a15b1f
update names.py with new gen3 names (#10)
M4d40 Oct 19, 2017
b8d8d06
gen3 frontend
ZeChrales Oct 19, 2017
655e5fb
Merge branch 'develop' of https://github.com/ZeChrales/Monocle into d…
ZeChrales Oct 19, 2017
d62319c
gen3 backend update
ZeChrales Oct 19, 2017
eda80e7
Legacy Update (#68)
cptmedic Oct 20, 2017
91c063c
Update README.md
MonkeyTedBaker Oct 20, 2017
9ee5173
update db struct for gen3
ZeChrales Oct 20, 2017
122de17
[fix]pokemon id columns
MonkeyTedBaker Oct 20, 2017
df644f7
[fix]change pokemon_id migration
MonkeyTedBaker Oct 21, 2017
70b7a4f
[add]sb detector improvement (#69)
MonkeyTedBaker Oct 21, 2017
a294307
Update sb.py
MonkeyTedBaker Oct 22, 2017
f483b0c
Merge branch 'develop' of github.com:ZeChrales/Monocle into monkey
MonkeyTedBaker Oct 22, 2017
b342699
[fix]set default KEEP_SPAWNPOINT_HISTORY to False
MonkeyTedBaker Oct 22, 2017
23b4245
[rmv]rubbish files
MonkeyTedBaker Oct 23, 2017
3a0bb2b
[add]reverted default KEEP_SPAWNPIONT_HISTORY to True
MonkeyTedBaker Oct 23, 2017
899f0fc
Walls at border (#70)
MonkeyTedBaker Oct 24, 2017
62c5b45
[add]some worker30 main loop debug logs
MonkeyTedBaker Oct 24, 2017
b44f55a
Add recaptcha
jmslagle Oct 24, 2017
402b0ac
Add values to sanitized.py
jmslagle Oct 24, 2017
863e11b
[fix]lv30 encounter swap error
MonkeyTedBaker Oct 25, 2017
aacdbd3
[add]stop baits
MonkeyTedBaker Oct 26, 2017
c90bc3b
Merge pull request #78 from MonkeyTedBaker/stopbait
MonkeyTedBaker Oct 26, 2017
5b2830c
[fix]account update connection pool issue
MonkeyTedBaker Oct 27, 2017
27b0f93
[fix]worker30 exception log
MonkeyTedBaker Oct 27, 2017
d0a8059
[add]db access lock to notification.py
MonkeyTedBaker Oct 27, 2017
3d44911
[fix]lock bugs
MonkeyTedBaker Oct 27, 2017
e69551d
[fix]await update_account_dict
MonkeyTedBaker Oct 27, 2017
24ce5fb
[fix]changed --swapin cron to every minute
MonkeyTedBaker Oct 27, 2017
1332af4
[fix]dont mark as credential error for failed to login too many times
MonkeyTedBaker Oct 27, 2017
5c12bd6
[add]put some max cap on time needed for stopbait
MonkeyTedBaker Oct 27, 2017
fd4ebe0
added a new option LOGGED_FILE size setting
beloware Oct 28, 2017
fb6ba87
Merge pull request #79 from beloware/logged_files
MonkeyTedBaker Oct 28, 2017
bb0827a
[add]encounter only on discovered spawnpoints
MonkeyTedBaker Oct 30, 2017
16d1182
Queuepool (#85)
cptmedic Oct 31, 2017
f270304
Merge pull request #75 from jmslagle/anticaptcha
MonkeyTedBaker Nov 1, 2017
7aec4fa
Monkey Raiders (#89)
MonkeyTedBaker Nov 2, 2017
e10eec7
[rmv]remove trash from worker30
MonkeyTedBaker Nov 3, 2017
5fff61f
[add]tweaks to improve raiders
MonkeyTedBaker Nov 3, 2017
6112aa3
[fix]tuning raider search
MonkeyTedBaker Nov 3, 2017
d02ccaa
[add]raider bug fix
MonkeyTedBaker Nov 3, 2017
065c897
[add]5 secs delay to retrying failed gyms
MonkeyTedBaker Nov 3, 2017
746a281
[fix]forts seen and pokemon seen counting
MonkeyTedBaker Nov 3, 2017
2c48f12
[fix]raider speed factor
MonkeyTedBaker Nov 3, 2017
6577f6e
[add]account nothing seen metrics for gym
MonkeyTedBaker Nov 3, 2017
0001d54
[fix]alleviate nothing seen raiders
MonkeyTedBaker Nov 3, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DEPLOY_CWD=/var/www/Monocle
DEPLOY_UID=1001
DEPLOY_GID=500
19 changes: 16 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,21 @@ Thumbs.db
ehthumbs.db
Desktop.ini

### Images ###
monocle/static/monocle-icons

### IntelliJ IDEA ###
.idea

### Supervisor
supervisor/
tmp/
node_modules/
*.swo
*.swp
log/
monotailer*.tgz
.cron.config.py

.env*
!.env.example

### Logs ###
logs/
5 changes: 2 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[submodule "monocle-icons"]
[submodule "monocle/static/monocle-icons"]
path = monocle/static/monocle-icons
url = https://github.com/Noctem/monocle-icons.git
ignore = all
url = https://github.com/MonkeyTedBaker/monocle-icons.git
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4.1
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Basic docker image for Monocle
# Usage:
# docker build -t Monocle
# docker run -d --name Monocle -P Monocle

FROM python:3.6

# Default port the webserver runs on
EXPOSE 5000

# Working directory for the application
WORKDIR /usr/src/app

# Set Entrypoint with hard-coded options
ENTRYPOINT ["python3"]
CMD ["./scan.py"]

# Install required system packages
RUN apt-get update && apt-get install -y --no-install-recommends libgeos-dev

COPY requirements.txt /usr/src/app/
COPY optional-requirements.txt /usr/src/app/

RUN pip3 install --no-cache-dir -r requirements.txt
RUN pip3 install --no-cache-dir -r optional-requirements.txt

# Copy everything to the working directory (Python files, templates, config) in one go.
COPY . /usr/src/app/
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Monocle/Monkey

Read [wiki](https://github.com/MonkeyTedBaker/Monocle/wiki) first before looking for help on Discord at `PMSF#monkey`.

# Monocle

[![Build Status](https://travis-ci.org/Noctem/Monocle.svg?branch=develop)](https://travis-ci.org/Noctem/Monocle)
Expand Down
74 changes: 74 additions & 0 deletions alembic.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# A generic, single database configuration.

[alembic]
# path to migration scripts
script_location = migrations

# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s

# timezone to use when rendering the date
# within the migration file as well as the filename.
# string value is passed to dateutil.tz.gettz()
# leave blank for localtime
# timezone =

# max length of characters to apply to the
# "slug" field
#truncate_slug_length = 40

# set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false

# set to 'true' to allow .pyc and .pyo files without
# a source .py file to be detected as revisions in the
# versions/ directory
# sourceless = false

# version location specification; this defaults
# to alembic/versions. When using multiple version
# directories, initial revisions must be specified with --version-path
# version_locations = %(here)s/bar %(here)s/bat alembic/versions

# the output encoding used when revision files
# are written from script.py.mako
# output_encoding = utf-8

#sqlalchemy.url = driver://user:pass@localhost/dbname


# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = WARN
handlers = console
qualname =

[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine

[logger_alembic]
level = INFO
handlers =
qualname = alembic

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
126 changes: 126 additions & 0 deletions cleanup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
import sys, os
from datetime import datetime
from crontab import CronTab
from argparse import ArgumentParser
from logging.handlers import RotatingFileHandler
from logging import getLogger, basicConfig, WARNING, INFO
from monocle import cleanup as Cleanup
from monocle.accounts import Account

if not os.path.exists("logs"):
os.makedirs("logs")

this_file = os.path.realpath(__file__)
root_dir = os.path.dirname(this_file)
log = getLogger('cleanup')
handlers = (RotatingFileHandler("{}/logs/cron.log".format(root_dir), maxBytes=500000, backupCount=5),)
basicConfig(
format='[{asctime}][{levelname:>8s}][{name}] {message}',
datefmt='%Y-%m-%d %X',
style='{',
level=INFO,
handlers=handlers
)

tag = "Monocle/Monkey-Cleanup {}".format(root_dir)

def parse_args():
parser = ArgumentParser()
parser.add_argument(
'-sh, --show-cron',
dest='show_cron',
help='Show the cron commands to be added.',
action='store_true'
)
parser.add_argument(
'-sc, --set-cron',
dest='set_cron',
help='Write cleanup jobs to crontab of current user.',
action='store_true'
)
parser.add_argument(
'-uc, --unset-cron',
dest='unset_cron',
help='Remove cleanup jobs from crontab of current user.',
action='store_true'
)
parser.add_argument(
'--light',
dest='light',
help='Run cleanups for sightings, fort_sightings, mystery_sightings and raids. Recommended to run this once a minute',
action='store_true'
)
#parser.add_argument(
# '--heavy',
# dest='heavy',
# help='Run cleanup for spawnpoints. Recommended to run every hour.',
# action='store_true'
#)
parser.add_argument(
'--swapin',
dest='swapin',
help='Run swap-in for hibernated accounts. Set ACCOUNTS_HIBERNATE_DAYS in config to change hibernation day. If not set, default would be 7.0 days.',
action='store_true'
)
return parser.parse_args()

def cron_jobs():
command = "cd {} && {} {}".format(root_dir, sys.executable, this_file)

cron = CronTab(user=True)
jobs = []

job_light = cron.new(command="{} --light >> {}/logs/cron.log 2>&1".format(command, root_dir),comment="{} --light".format(tag))
jobs.append(job_light)

#job_heavy = cron.new(command="{} --heavy >> {}/logs/cron.log 2>&1".format(command, root_dir),comment="{} --heavy".format(tag))
#job_heavy.minute.on(5)
#jobs.append(job_heavy)

job_swapin = cron.new(command="{} --swapin >> {}/logs/cron.log 2>&1".format(command, root_dir),comment="{} --swapin".format(tag))
job_swapin.minute.every(5)
jobs.append(job_swapin)

return cron, jobs

def remove_jobs():
cron = CronTab(user=True)
for job in cron:
if job.comment.startswith(tag+" "):
cron.remove(job)
cron.write()


def main():
args = parse_args()

if args.show_cron:
cron, jobs = cron_jobs()
print("-" * 53)
print("The following cron jobs will be added to your crontab")
print("-" * 53)
for job in jobs:
print(job)
print("")
elif args.set_cron:
remove_jobs()
cron, jobs = cron_jobs()
cron.write()
print("Crontab changed. Cron jobs added.")
elif args.unset_cron:
remove_jobs()
print("Crontab changed. Cron jobs removed.")
elif args.light:
log.info("Performing light cleanup.")
Cleanup.light()
#elif args.heavy:
# log.info("Performing heavy cleanup.")
# Cleanup.heavy()
elif args.swapin:
log.info("Performing swap-in of hibernated accounts.")
Account.swapin()
else:
print("Set --help for available commands.")

if __name__ == '__main__':
main()
Loading