Fix overseerr structures
This commit is contained in:
		
							parent
							
								
									d1b47e0bd9
								
							
						
					
					
						commit
						442b518ced
					
				
					 4 changed files with 5 additions and 7 deletions
				
			
		|  | @ -162,8 +162,8 @@ if __name__ == "__main__": | |||
|             OVERSEER = OverseerrAPI(server, DBMANAGER) | ||||
|             if server.get_request_total_counts: | ||||
|                 at_time = schedule.every(server.request_total_run_seconds).seconds | ||||
|                 at_time.do(thread, OVERSEER.get_request_status_counts).tag("overseerr-{}-get_request_status_counts" | ||||
|                                                                            .format(server.id)) | ||||
|                 at_time.do(thread, OVERSEER.get_request_counts).tag("overseerr-{}-get_request_counts" | ||||
|                                                                     .format(server.id)) | ||||
|             if server.get_latest_requests: | ||||
|                 at_time = schedule.every(server.num_latest_requests_seconds).seconds | ||||
|                 at_time.do(thread, OVERSEER.get_latest_requests).tag("overseerr-{}-get_latest_requests" | ||||
|  |  | |||
|  | @ -102,10 +102,10 @@ apikey = xxxxxxxxxxxxxxxx | |||
| ssl = false | ||||
| verify_ssl = false | ||||
| get_request_total_counts = true | ||||
| request_total_run_seconds = 300 | ||||
| request_total_run_seconds = 30 | ||||
| get_latest_requests = true | ||||
| num_latest_requests_to_fetch = 10 | ||||
| num_latest_requests_seconds = 300 | ||||
| num_latest_requests_seconds = 30 | ||||
| 
 | ||||
| [sickchill-1] | ||||
| url = sickchill.domain.tld:8081 | ||||
|  |  | |||
|  | @ -18,7 +18,7 @@ class OverseerrAPI(object): | |||
|     def __repr__(self): | ||||
|         return f"<overseerr-{self.server.id}>" | ||||
| 
 | ||||
|     def get_request_status_counts(self): | ||||
|     def get_request_counts(self): | ||||
|         now = datetime.now(timezone.utc).astimezone().isoformat() | ||||
|         endpoint = '/api/v1/request/count' | ||||
| 
 | ||||
|  |  | |||
|  | @ -64,8 +64,6 @@ class OverseerrServer(NamedTuple): | |||
|     verify_ssl: bool = False | ||||
|     get_request_total_counts: bool = False | ||||
|     request_total_run_seconds: int = 30 | ||||
|     get_request_status_counts: bool = False | ||||
|     request_status_run_seconds: int = 30 | ||||
|     get_latest_requests: bool = False | ||||
|     num_latest_requests_to_fetch: int = 10 | ||||
|     num_latest_requests_seconds: int = 30 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue