MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / is_expired

Method is_expired

apps/base/models.py:32–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 upload_id = fields.CharField(max_length=36, null=True)
31
32 async def is_expired(self):
33 if self.expired_at is None:
34 return False
35 if self.expired_at and self.expired_count < 0:
36 return self.expired_at < await get_now()
37 return self.expired_count <= 0
38
39 async def get_file_path(self):
40 return f"{self.file_path}/{self.uuid_file_name}"

Callers 6

get_code_file_by_codeFunction · 0.45
_get_valid_sessionFunction · 0.45
presign_upload_statusFunction · 0.45
dashboardFunction · 0.45

Calls 1

get_nowFunction · 0.90

Tested by

no test coverage detected