Stuff
This commit is contained in:
parent
907bbc7967
commit
a6990d16e4
4 changed files with 4 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,3 +11,4 @@ Homestead.json
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
|
storage/cache
|
||||||
|
|
|
@ -44,7 +44,7 @@ class CalculateSpace extends Command
|
||||||
$day = date("Y-m-d");
|
$day = date("Y-m-d");
|
||||||
$day = "2021-01-11";
|
$day = "2021-01-11";
|
||||||
$galleries = Gallery::query()->get();
|
$galleries = Gallery::query()->get();
|
||||||
for ($i = 0; $i <= 24; $i++) {
|
for ($i = 0; $i < 24; $i++) {
|
||||||
foreach ($galleries as $gallery) {
|
foreach ($galleries as $gallery) {
|
||||||
//Get file size for that hour for that gallery
|
//Get file size for that hour for that gallery
|
||||||
$start = $day." ".$i.":00:00";
|
$start = $day." ".$i.":00:00";
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Traffic extends Authenticatable
|
||||||
];
|
];
|
||||||
|
|
||||||
public static function getLastDays(int $days = 7) {
|
public static function getLastDays(int $days = 7) {
|
||||||
$sql = "SELECT year, month, SUM(traffic) AS `traffic` FROM traffic WHERE tenant = 1 GROUP BY year, month, day ORDER BY year, month, day DESC LIMIT ".$days.";";
|
$sql = "SELECT year, month, day, SUM(traffic) AS `traffic` FROM traffic WHERE tenant = 1 GROUP BY year, month, day ORDER BY year, month, day DESC LIMIT ".$days.";";
|
||||||
$res = DB::select($sql);
|
$res = DB::select($sql);
|
||||||
|
|
||||||
$now = new \DateTime( $days." days ago", new \DateTimeZone('UTC'));
|
$now = new \DateTime( $days." days ago", new \DateTimeZone('UTC'));
|
||||||
|
|
|
@ -54,7 +54,7 @@ Setup env
|
||||||
```
|
```
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name kuvia.cloud www.kuvia.cloud;
|
server_name kuvia.cloud www.kuvia.cloud www1.kuvia.cloud www1.kuvia.cloud www2.kuvia.cloud www3.kuvia.cloud www4.kuvia.cloud www5.kuvia.cloud www6.kuvia.cloud www7.kuvia.cloud www8.kuvia.cloud www9.kuvia.cloud;
|
||||||
root /var/www/kuvia/public;
|
root /var/www/kuvia/public;
|
||||||
|
|
||||||
index index.html index.htm index.php;
|
index index.html index.htm index.php;
|
||||||
|
|
Loading…
Reference in a new issue