-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdev_notes.txt
42 lines (38 loc) · 2.38 KB
/
dev_notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## URL formats
There are several URL formats FTM uses.
- Generally, all URLs should be in the "canonicalized" format created by resolve_url_database(). The canonical format is
UPPERCASE, with HTTP/HTTPS/WWW. removed and any trailing slashes removed.
- The URL canonicalizer will also join projects which have multiple attach URLs for the same project.
- We use non-canonical URLs when speaking with Gridcoin or BOINC RPC since they have their own formats. BOINC is
particularly picky about capitalization. When we fetch data from these tools, we convert it into canonical format as
soon as possible (sometimes in the fetch function itself). Use the URL converters resolve_url_boinc_rpc to turn URLs
into URLs BOINC will like.
# DATABASE is used to track various counters etc during the program's operation. It is saved at opportune times
# in the program's execution including when user issues a ctrl + c. It should only be used for variables which are
# needed across executions or across functions
# stored as stats.json in whatever directory the script is run from
# DEV is same as CLIENT, just for developer's BOINC install
DATABASE format:
'GRCPRICELASTCHECKED':datetime.datetime # last time we checked GRC's price
'GRCPRICE':float # last known average price of GRC
'DEVTIMETOTAL': float # total amount of minutes crunched for dev
'FTMTOTAL': float # total amount of minutes crunched for non-dev
'LASTUPDATECHECK':datetime.datetime # last time we checked for updates from github
'MAGLASTCHECKED': datetime.datetime # last time we queried mag amounts
'STATSLASTCALCULATED':datetime.datetime # last time we calculated stats
'LASTGRIDCOINSTATSPROJECTCHECK':datetime.datetime, # last time we checked gridcoinstats for projects
'GSPROJECTLIST':List[str] # cached project list from gridcoinstats
'GSRESOLVERDICT':Dict[str,str] # cached project url resolver from gridcoinstats
'STARTMAGHR':float # Total average mag/hr the first time this script was run
'TABLE_SLEEP_REASON':str Sleep reason listed in pretty-printed table
'TABLE_STATUS': str info/status str shown in table
'CLIENT':{
'PROJECTURL':{ # Key is uppercased after running through resolve_boinc_url
'LAST_CHECKED':datetime.datetime,
'BACKOFF':int, # Time before we should check this project again, is doubled every time we receive a backoff again
}
},
'DEV':{
}
To diagnose which BOINC clients are up and running:
Linux: sudo netstat -tuplen|grep boinc